Skip to content

feat(app-shell): Connect an Agent asks which AI client you use and shows only its steps - #30943

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-rrq77k
Nov 6, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-rrq77k

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Fixes #30896

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:「连接智能体」页不再一次铺开七张卡片。端点与 SKILL.md 下载仍在最上方;其下先问「你用的是哪个 AI 助手?」(Claude、Codex、Cursor、WorkBuddy、豆包工作、千问办公),只显示所选那一个的步骤,切换一次点击,本浏览器记住选择;API 密钥表单移到底部折叠的「高级:脚本与 CI」。
  • 为什么改:一个人只用一个客户端,原来要翻过另外六个客户端的说明才找到自己的步骤,API 密钥卡还混在客户端中间。实测页面主体从 1604 px 降到 664 px 高。
  • 风险与回滚:只动这一个页面组件和新增的三条文案;选择存在本地浏览器(os:pref:connect.client),读不到时回到 Claude。密钥签发逻辑原样未改。回滚即 revert 本 PR。
  • 先看:ui/packages/app-shell/src/console/connect/ConnectAgentWidget.tsx(Tabs 与 Collapsible 两处)、connectClientPreference.ts、测试文件末尾新增的 describe。
  • 两分钟验证:打开 设置 → Connect an Agent,点「Codex」,刷新页面仍停在 Codex;点「高级:脚本与 CI」才出现 API 密钥表单。
  • 需要你做的:无,席位落地。
  • 席位意见:ui 席 2 对照 head 953cfc49 的 diff 复核:14 个文件、+448 / −207,无受治理路径。各客户端步骤、片段与提示文字原样搬进 Tabs,只渲染所选一个;选择经控制台既有的偏好存储(user 范围,os:pref:connect.client)保存,读不到或已不提供的客户端回到 Claude;API 密钥卡整体移入默认折叠的「高级:脚本与 CI」,签发与确认逻辑未改,签发结果状态在父组件,折叠不会丢失。席位核对时更正了 changeset 里新增文案的条数(三条),此外无改动。CI 全绿,Clause-② no,不欠契约复审。同意落地。

What changes

  • ConnectAgentWidget.tsx: under the endpoint card (URL, copy, SKILL.md download — unchanged, on top for everyone), a card asks "Which AI assistant do you use?" and holds a Tabs picker from @object-ui/components with the six clients in the order the page offered them. Only the chosen client's steps render; every client's steps, snippets and hints are the same text as before. The API key card moves into a Collapsible "Advanced: scripts and CI" at the bottom, closed by default; its mint/confirm logic is unchanged.
  • connectClientPreference.ts (new): the client ids and the reader's choice, declared through the console's one preference store (utils/workspacePreference.ts, imported, not edited), user scope, stored as {"client":"CLIENT_ID","v":1} under os:pref:connect.client. A stored id the page no longer offers, an unreadable record, or storage that throws reads as no choice → Claude. The store already wraps every storage access in try/catch.
  • i18n: three new keys (connectAgent.client.title, connectAgent.client.hint, connectAgent.advanced.title) in all ten console packs. PR feat(i18n)!: the Console's language packs follow the platform locale table, keyed by its tags, and Traditional Chinese (zh-Hant) ships #30902 is not on main, so they sit in today's zh.ts / pt.ts.
  • Root changeset .changeset/30896-connect-agent-client-picker.md (@object-ui/app-shell, @object-ui/i18n: patch).

Tests

ConnectAgentWidget.keyName-13355.test.tsx (the component's one harness file):

  • the three key-name cases open the Advanced section first, then assert as before;
  • the Chinese-clients block now walks the picker: tab order, each client's body + hint on pick, each client's transport spelling;
  • new top-level describe: endpoint + SKILL.md on top, Claude only with no choice, key form collapsed until opened; one click switches and the choice is stored and read back after remount; an unknown stored client reads as Claude.

Acceptance notes

Verification

Head 6111073f (my commit 181fd4df + merge of origin/main 33043bd8, no overlap with this diff).

Live measure on a local deployment (showcase with the fresh flag, console Vite dev), admin and member

Widget body height at a 1004 px wide pane:

  • before (main 0e88208 source): admin 1604 px, member 1604 px. Endpoint card, the Claude card, then Codex, Cursor, WorkBuddy, Doubao Work, QwenWork and the API key card, all open.
  • after: admin 664 px, member 664 px. Endpoint card, the picker card showing Claude's steps, the closed "Advanced: scripts and CI" trigger.
  • member click-through: pick Codex → Codex steps shown, claude mcp add gone, localStorage['os:pref:connect.client'] = {"client":"codex","v":1}; reload → Codex still selected; API key name input absent until Advanced is opened, present after.
Local tests and gates
  • pnpm --dir ui exec vitest run packages/app-shell/src/console/connect/ → 9/9 passed (on 181fd4d and again on 6111073)
  • pnpm --dir ui exec vitest run packages/i18n/ → 97 files, 1521 passed, 13 skipped
  • pnpm --dir ui exec vitest run packages/app-shell/src/__tests__/product-neutral-renderer.ratchet.test.ts → 32/32
  • pnpm --filter @object-ui/i18n run type-check && pnpm --filter @object-ui/app-shell run type-check → exit 0
  • eslint on the three changed widget files → 0 errors; pnpm check:new-line-citations → 0 new
  • dispatch-gates --commands derived 36 commands on 181fd4d; all 36 exit 0 (incl. node scripts/check-sdui-manifest.mjs, pnpm --dir ui exec vitest run scripts/ 170 files passed); --ran reconciliation: 36 run, 0 NOT-MEASURED, 0 UNRUN.

…ows only its steps

Under the endpoint and the SKILL.md download, a client picker (Claude,
Codex, Cursor, WorkBuddy, Doubao Work, QwenWork) shows one client's steps;
the choice is kept per browser through the console's workspace preference
store. The API key form moves to a collapsed 'Advanced: scripts and CI'
section at the bottom. New strings in all ten console languages.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibzWZSWpaweunqGyeA9
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 6, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#2 · os-tesla · session_01L9qibw7DekEe3wx5f3zphf

席位核对 · ACCEPT · 2026-11-06T13:35Z · head 953cfc495f9465230d1a3ab4b200b3a514e575ce

Seat domain:ui#2 reviewed the diff of its own dispatch (claim 6684393308 on #30896, card thread session_01L9qibzWZSWpaweunqGyeA9). The same seat dispatched and reviews; the code is the thread's.

  1. Shape: 14 files, +448 / -207. ConnectAgentWidget.tsx: the endpoint card (URL, copy, SKILL.md) stays on top. Below it, a "Which AI assistant do you use?" card holds a Tabs picker over the six clients in the page's existing order. Only the chosen client's steps render; their snippets and hints are moved verbatim. The API key card moves whole into a Collapsible "Advanced: scripts and CI", closed by default. The mint/confirm logic is unchanged, and the minted state lives in the parent, so collapsing does not lose a shown key. The new connectClientPreference.ts declares the choice through the console's one preference store (utils/workspacePreference.ts, not edited), user scope, versioned record under os:pref:connect.client. An id the page no longer offers reads as Claude. Three new console keys ship in ten locales. Fixes #30896.
  2. Premise measured: live, as an admin and as a member (per report): the widget body went from 1604 px to 664 px. Switch, persist across reload, and the Advanced toggle were checked.
  3. Gates / check-runs: 55 check runs on this head, 44 success, 11 skipped, 0 red; all ten required contexts are success. 36 derived gates were run, 36 exit 0, --ran reconciled. Widget tests 9/9, i18n 97 files, app-shell and i18n type-check clean. The delta 6111073f..953cfc49 is one line in the changeset: the seat-review fix, "two" → "three" new strings.
  4. Accepted deviation: none. Noted: the Doubao, WorkBuddy and QwenWork fallback hints still say "create a key below", which stays true with the form collapsed under Advanced. Connect an Agent offers the claude.ai and cloud-task steps on a deployment those clients cannot reach, with only a line of small print #30897 and Connect an Agent never says what an assistant can do once connected, or whether the connection worked #30898 name Advanced if they touch those hints.
  5. Out of scope / Skills-docs: none filed. Metadata-protocol: none; Skills-docs: not owed.
  6. Landing: check-governed-merges --branch on the final list: not governed, 655 changed lines, so Tier S, with no human approval owed. Clause-②: no, and no packages/spec/src file is touched, so no contract review is owed. Landing on the maintainer's standing words 「按 pm-dispatch 审过的pr你可以自主落地」 (2026-10-30T14:20Z) and 「ui 车道跟进一下 3小时内没更新的pr和已派发的issue,接手处理。」 (2026-11-06T05:20Z): relay pr_ready, then automerge_enable. On merge the card closes. Connect an Agent offers the claude.ai and cloud-task steps on a deployment those clients cannot reach, with only a line of small print #30897 follows in the same thread, from a branch restarted on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connect an Agent shows all seven clients at once; ask which one the person uses and show only those steps

1 participant